<!DOCTYPE html>
<html>
<head>
    <title>SwiftUI WebView</title>
    <script type="text/javascript">

        function receiveMessageFromiOS(message) {
            console.log("Received message from iOS: " + message);
            alert("Message from Swift: " + message);
        }

        function sendMessageToiOS() {
            window.webkit.messageHandlers.iosBridge.postMessage("Hello from JavaScript!");
        }
    </script>
    <style>
        /* 设置网页背景为透明 */
        html, body {
            background-color: transparent;
            margin: 0;
            padding: 0;
            height: 100%;
            width: 100%;
        }
    </style>
</head>
<body>
    <h1>WebView with JavaScript Bridge</h1>
    <button id="button", onclick="sendMessageToiOS()">Send Message to iOS</button>
</body>
</html>
